home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / wwais103 / save.frm < prev    next >
Text File  |  1995-05-08  |  4KB  |  149 lines

  1. VERSION 2.00
  2. Begin Form save_form 
  3.    BackColor       =   &H00808080&
  4.    Caption         =   "WAIS Save"
  5.    ClientHeight    =   3855
  6.    ClientLeft      =   2400
  7.    ClientTop       =   2115
  8.    ClientWidth     =   4710
  9.    Height          =   4260
  10.    Left            =   2340
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3855
  16.    ScaleWidth      =   4710
  17.    Top             =   1770
  18.    Width           =   4830
  19.    Begin DirListBox dir_box 
  20.       BackColor       =   &H00FFFF00&
  21.       Height          =   2055
  22.       Left            =   1920
  23.       TabIndex        =   0
  24.       Top             =   1560
  25.       Width           =   1575
  26.    End
  27.    Begin DriveListBox drive_box 
  28.       BackColor       =   &H00FFFF00&
  29.       Height          =   315
  30.       Left            =   1920
  31.       TabIndex        =   1
  32.       Top             =   1080
  33.       Width           =   1575
  34.    End
  35.    Begin FileListBox file_box 
  36.       BackColor       =   &H00FFFF00&
  37.       Height          =   2565
  38.       Left            =   240
  39.       TabIndex        =   2
  40.       Top             =   1080
  41.       Width           =   1575
  42.    End
  43.    Begin CommandButton cancel 
  44.       Caption         =   "&Cancel"
  45.       Height          =   375
  46.       Left            =   3600
  47.       TabIndex        =   8
  48.       Top             =   720
  49.       Width           =   855
  50.    End
  51.    Begin CommandButton ok 
  52.       Caption         =   "&OK"
  53.       Height          =   375
  54.       Left            =   3600
  55.       TabIndex        =   7
  56.       Top             =   240
  57.       Width           =   855
  58.    End
  59.    Begin TextBox filename 
  60.       BackColor       =   &H00FFFF00&
  61.       Height          =   285
  62.       Left            =   1320
  63.       TabIndex        =   4
  64.       Top             =   240
  65.       Width           =   2175
  66.    End
  67.    Begin Label Label3 
  68.       BackColor       =   &H00808080&
  69.       Caption         =   "Directories"
  70.       Height          =   255
  71.       Left            =   1920
  72.       TabIndex        =   6
  73.       Top             =   720
  74.       Width           =   1455
  75.    End
  76.    Begin Label Label2 
  77.       BackColor       =   &H00808080&
  78.       Caption         =   "Files"
  79.       Height          =   255
  80.       Left            =   360
  81.       TabIndex        =   5
  82.       Top             =   720
  83.       Width           =   615
  84.    End
  85.    Begin Label Label1 
  86.       BackColor       =   &H00808080&
  87.       Caption         =   "File Name:"
  88.       Height          =   255
  89.       Left            =   240
  90.       TabIndex        =   3
  91.       Top             =   240
  92.       Width           =   975
  93.    End
  94. End
  95. Sub cancel_Click ()
  96.  
  97.     save_form.Hide
  98.  
  99. End Sub
  100.  
  101. Sub dir_box_Change ()
  102.  
  103.     file_box.path = dir_box.path
  104.         
  105. End Sub
  106.  
  107. Sub drive_box_Change ()
  108.  
  109.     dir_box.path = drive_box.drive
  110.  
  111. End Sub
  112.  
  113. Sub file_box_DblClick ()
  114.  
  115.     filename.text = UCase$(file_box.filename)
  116.     
  117. End Sub
  118.  
  119. Sub Form_Load ()
  120.  
  121.     file_box.pattern = filename.text
  122.  
  123. End Sub
  124.  
  125. Sub ok_Click ()
  126.  
  127.     Dim rec As String * 1
  128.      mousepointer = HOURGLASS
  129.     savename$ = dir_box.path + "\" + filename.text
  130.    
  131.     Open savename$ For Binary As #2
  132.      Close 1
  133.      Open "wais.$$$" For Binary As #1
  134.     doc_lines& = LOF(1)
  135.     For x& = 1 To doc_lines&
  136.         Get #1, x&, rec
  137.         Put #2, x&, rec
  138.     Next x&
  139.  
  140.     Close (2)
  141.     Close (1)
  142.      Open "wais.$$$" For Random As #1 Len = 80
  143.      mouseptr = DEFAULT
  144.     
  145.     save_form.Hide
  146.  
  147. End Sub
  148.  
  149.